< previous page page_149 next page >

Page 149
9f31265bb40b592b1929e18a47ab28e5.gif
1 + 2
4 - 3
3 < 4
Lets look at the list of mathematical operators. The sample form Operators.frm has an example of each of the mathematical operators (see Figure 7.5). Table 7.1 shows you each of the different mathematical operators used in Visual Basic.
8160-0149a.gif
Figure 7.5
Examples of mathematical operators.
Examples Filename: Operators.frm
Table 7.1 Mathematical Operators.
OperatorDescriptionExample
Addition (+)Adds two numbers together3 + 4 = 7
Subtraction (-)Subtracts one number from another number4 - 3 = 1
Multiplication (*)Multiplies two numbers together4 * 3 = 12
Division (/)Divides one number by another number4 / 3 = 1.3333
Integer division (\)Divides one number by another number but truncates the decimal portion of the number4 \ 3 = 1

(table continued on next page)

 
< previous page page_149 next page >

If you like this book, buy it!